/*
 * Copyright 2022 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.mx.ymate.serv.impl;

import com.mx.ymate.serv.IMxServ;
import com.mx.ymate.serv.IMxServConfig;
import net.ymate.platform.core.module.IModuleConfigurer;
import net.ymate.platform.core.module.impl.DefaultModuleConfigurable;

/**
 * DefaultMxServConfig generated By ModuleMojo on 2022/07/07 14:10
 *
 * @author YMP (https://www.ymate.net/)
 */
public final class DefaultMxServConfigurable extends DefaultModuleConfigurable {

    public static Builder builder() {
        return new Builder();
    }

    private DefaultMxServConfigurable() {
        super(IMxServ.MODULE_NAME);
    }

    public static final class Builder {

        private final DefaultMxServConfigurable configurable = new DefaultMxServConfigurable();

        private Builder() {
        }

        public Builder enabled(boolean enabled) {
            configurable.addConfig(IMxServConfig.ENABLED, String.valueOf(enabled));
            return this;
        }

        public IModuleConfigurer build() {
            return configurable.toModuleConfigurer();
        }
    }
}